<?php

namespace app\common\model;

use app\common\controller\Helper;
use think\Model;

class LangClassLessonFile extends Model
{
    use Helper;

    protected $table = 'lang_class_lesson_file';

    const TYPE_VIDEO = 1;
    const TYPE_AUDIO = 2;
    const TYPE_CLASS_FILE = 3;
    const TYPE_HOMEWORK = 4;
    const FREE = 1;

    // 我的轨迹文件类型
    const WATCH_LOG_ARR = [self::TYPE_VIDEO, self::TYPE_AUDIO, self::TYPE_CLASS_FILE];

    public static function attributes($attribute, $key = null)
    {
        $list = [
            'type' => [
                self::TYPE_VIDEO => '视频',
                self::TYPE_AUDIO => '音频',
                self::TYPE_CLASS_FILE => '课件',
                self::TYPE_HOMEWORK => '随堂作业'
            ],
        ];
        return self::attributeReturn($list, $attribute, $key);
    }
}